package com.qing.test.config;

/**
 * @author caozhipeng
 * @date 2025/7/24
 */
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.qing.test.aspect.ListNullProcessor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

@Configuration
public class WebConfig  {

//    @Autowired
//    private ObjectMapper objectMapper;
//
//    @Override
//    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
//        // 使用默认的ObjectMapper
//        MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
//        converter.setObjectMapper(objectMapper);
//        converters.add(converter);
//    }

//    @Bean
//    public ListNullProcessor listNullProcessor(MappingJackson2HttpMessageConverter converter) {
//        return new ListNullProcessor(converter);
//    }
}
